Autobaud rate detection mechanism

ABSTRACT

An autobaud detection mechanism, installed as part of the communication control software of a serial communication device&#39;s microcontroller, enables the device to automatically determine the baud rate employed by a remote digital data communications device. Starting with a default baud rate, corresponding to the highest available baud rate, the mechanism steps through successively lower baud rates in the course of a search for the baud rate at which the remote device is transmitting. When an incoming call is received, respective bits of the received data are examined for the presence of transmission errors. If a transmission error is detected, the baud rate is stepped to the next lowest baud rate. If no error is detected, the received data bits are compared with a reference character. If the two compared data bit patterns match, the controller locks the baud rate at that baud setting for the remainder of the call. When the call is terminated, the baud rate reverts to its default setting. If the bit pattern comparison does not indicate a match, the baud rate is stepped to the next lowest baud rate. When the autobaud detection routine has stepped to a new baud rate entry, it initiates a prescribed time-out as a safeguard against the receiver becoming `out-of-sync` with a transmitter. Once, the lowest baud rate has been reached, the routine steps to the default setting and starts again.

FIELD OF THE INVENTION

The present invention relates in general to communication systems, suchas telephone systems, and is particularly directed to a mechanism forenabling a digital data communications device, such as a serialinput/output device (SIO), universal asynchronous receiver/transmitter(UART), etc., that may be associated with a telephone line test,conditioning and reporting unit, to automatically tune itself to thebaud rate of a received digital data message.

BACKGROUND OF THE INVENTION

Digital data communications devices customarily employ one or moreserial ports through which digital data messages are interfaced betweena resident signalling processor and a serial data communications link towhich a remote terminal device is coupled. Because digital datacommunications may be conducted at a number of different baud rates(e.g. 1200, 2400, 4800, 9600 baud), such devices customarily employ oneor both of a software routine and panel DIP (dual in-line packaging)switch through which a user, knowing the baud rate at whichcommunications with a remote terminal device are to be conducted, loadsa selected baud rate into an internal register for use by an attendantmodem.

Unfortunately, there are variety of applications of digitalcommunications devices, which are to be remotely accessed, in order thatan attendant utility device may be conditioned and controlled, withoutthe availability of technical personnel having prior knowledge of thebaud rate used by the remote. A non-limitative example of such anapplication is diagrammatically illustrated in FIG. 1, which shows thedistribution of a plurality of remote test equipments or measurementunits 11 for monitoring and testing network lines 13 and (subscriber)termination equipment 15 remotely from one or more data terminal units(DTUs) 21, which have the capability of accessing the remote testequipments 11 through attendant modem devices 23, 24 that are linked toa central office 25.

Because the baud rates of the remote data terminal units which mayaccess such equipments are not necessarily known at the time ofinstallation, and indeed can be expected to vary from unit to unit, itis necessary to have a craftsperson perform-on-site (trial and error)adjustment of control switch settings. Moreover, where a remotelyaccessible piece of equipment contains multiple serial ports, theoverall hardware complexity (and therefore cost) of affording baud rateadjustment for each serial port is substantially increased.

SUMMARY OF THE INVENTION

In accordance with the present invention, the above describedshortcomings of conventional baud rate setting and adjustment schemes,which require the participation of technical personnel to determine andthen perform parameter adjustments of the control settings of theterminals units are effectively obviated by what may be termed an`autobaud` detection mechanism, which is installed as part of thecommunication control software of the serial communication device'smicrocontroller, and which enables the microcontroller to automaticallydetermine the baud rate employed by a remote digital data communicationsdevice, so that the baud rate of the internal modem of the unit may bereadily set and locked to that baud rate.

More particularly, rather than employ conventional baud-setting switchesthrough which baud rate must be set by an on-site craftsperson, thepresent invention employs a table of baud rate entries (e.g. 9600, 4800,2400, 1200, 600, 300), at each of which the terminal unit's serialcommunication device (modem) is capable of operating. Because the baudrate table is microcontroller-resident, it is programmable, so that thetuning capabilities of the serial input output device may be updated,for example by the replacement of a modem card capable of handling aprescribed set of baud rates with a more enhanced modem card having anexpanded set of baud rates.

Pursuant to the invention the highest baud rate within the table is thedefault baud rate, which the detection mechanism employs when initiatinga baud rate detection routine in response to an incoming call. Theroutine is operative to step through successively lower baud rates fromthe highest baud rate in the course of a search for the baud rate atwhich the remote device is transmitting. The baud rate entries of thetable are stored in sequential addresses in memory, which may be scannedby an associated soft-counter which controls baud rate entry access, thesoft-counter rolling over to the highest entry once it has stepped tothe lowest entry address. This roll-over to the default entry ensuresthat the search will not become `hung up` on any baud rate.

When an incoming call is received, and the terminal device goesoff-hook, the respective bits of the received data (a potentially validcharacter, such as a carriage return) are stored, and the received databit pattern is analyzed for the presence of transmission errors, such asframing, parity and overrun. If a transmission error is detected, thenit is inferred that what has been received is not a valid character atthe current (default) baud rate setting. The routine then increments thebaud rate table address counter so as to step to the next lowest baudrate entry in the table.

If, on the other hand no transmission error has been detected, it isinferred assumed that what has been received is a potentially validcharacter at the present baud rate setting, and the stored data bits arecompared with a prescribed reference character (e.g. carriage return).If the serial bit compositions of the two compared data bit patternsmatch, it is inferred that the remote site is transmitting at thecurrent baud setting, and the microcontroller locks the modem baud rateat that baud setting for the remainder of the call. When the call isterminated and the device logs off into an idle state, the baud ratereverts to its default setting. If the bit pattern comparison does notindicate a match, it is inferred that the remote site is nottransmitting at the current baud setting, and the routine increments thebaud rate table address counter to step to the next baud rate entry inthe table.

When the autobaud detection routine has stepped to a new baud rateentry, it initiates a prescribed time-out (e.g. five seconds) as asafeguard against the receiver becoming `out-of-sync` with atransmitter, whose baud rate is faster than that to which the receivingserial device is currently set. Within this time period, if thereceiving serial device does not receive a further character bitpattern, it reverts to the default setting, thereby reinitiating thebaud rate detection process. The length of the time out period is basedupon the lowest baud rate available, and is no less than the minimumcharacter receive time for the lowest baud rate entry and allowing forcharacter separation for every incoming character in order to ensureproper character identification. Customarily, the user at the remote endrepeatedly asserts the character (hits the carriage return key), toestablish a connection at any of the available baud rates. When a newcharacter pattern is received within the time out window (which isnormally the case), the routine checks the contents of the character fortransmission errors, and the process proceeds as described above.

Eventually, the autobaud detect routine will have stepped to the baudrate being transmitted, and will have captured and matched theconnectivity character at the proper baud rate. If a transmission erroroccurs, it may be necessary to restep through the baud rate table entrysequence. However, with the wrap around feature of the table entryaddressing scheme, it is ensured that the process will not hang up onany particular baud rate.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 diagrammatically illustrates a telephone network having aplurality of distributed remote test equipments that are linked tosupervisory data terminal units by way of a central office; and

FIG. 2 is a flow chart of the digital communications processing routineemployed by the autobaud detection mechanism in accordance with thepresent invention.

DETAILED DESCRIPTION

Before describing in detail the autobaud detection mechanism inaccordance with the present invention, it should be observed that theinvention resides primarily in what is effectively a prescribedaugmentation of the communication control software of the serialcommunication device's microcontroller, which enables themicrocontroller to automatically determine the baud rate employed by aremote digital data communications device, so that the baud rate of theinternal modem of the unit may be readily set and locked to that baudrate for the duration of the communication. The details of the circuitryof the serial communication devices are otherwise essentiallyunaffected. Consequently, the configuration of such devices and themanner in which they are interfaced with other communication equipmentof the telephone network have been illustrated in the drawings byreadily understandable block diagrams, which show only those specificdetails that are pertinent to the present invention, so as not toobscure the disclosure with details which will be readily apparent tothose skilled in the art having the benefit of the description herein.Thus, the block diagram illustrations of the Figures are primarilyintended to illustrate the major components of the system in aconvenient functional grouping, whereby the present invention may bemore readily understood. The autobaud detection mechanism of the presentinvention will be described with reference to FIG. 2 which is acommunications signal processing flow routine through which the baudrate of a remote message-sourcing terminal may be automaticallydetermined.

As pointed out briefly above, rather than employ baud-setting switchesthrough which baud rate may be set by craftsperson intervention, thepresent invention employs a set or table of baud rate entries, at any ofwhich the terminal unit's serial communication device (modem) is capableof operating. Because the baud rate table is microcontroller resident,it is programmable, so that the autobaud detection mechanism may beupdated as the communication capabilities of the terminal unit change,for example by the replacement of a modem card capable of handling aprescribed set of baud rates with a more enhanced modem card having anexpanded set of baud rates.

Referring now to FIG. 2, which shows respective steps of thecommunications processing routine of autobaud detection mechanism inaccordance with the present invention, the baud detection process beginsat step 201, with the serial communications device (e.g. UART, SIO,etc,) in an IDLE or ON-HOOK mode. During this state, the microcontrollerof the device defaults to the highest baud rate in its baud rate table,shown at 200. In order to facilitate stepping through successively lowerbaud rates, the baud rate entries may be stored in sequential addressesin memory, with an associated soft-counter which controls baud rateentry access rolling over to the highest entry once it has stepped tothe lowest entry address, so that the baud rate access mechanism isoperative to `wrap around` on itself, and therefore does not become`hung up` on any particular (the lowest) baud rate. For purposes of anillustrative example, the baud rate entry table may contain four baudrates (1200, 2400, 4800 and 9600). Thus, the default entry for thisexample is 9600 baud.

When an incoming call is received, and the terminal device goesoff-hook, as shown at step 203, the respective bits of one or morepotentially valid characters employed to establish communicationsbetween terminal units are stored in a register or section of memorydedicated to character matching, as will be described. For purposes ofthe present description, as a non-limitative example, and keeping withcurrently accepted practice in establishing and confirming connectivitybetween a data-sourcing site (calling party) and a data destination site(called party), a carriage return character (ENTER=ASCII 13) is employedas the character to be transmitted and identified for baud ratedetection.

As data bits of a potentially valid character are received and stored(step 205), they are analyzed by the serial communications device forthe presence of transmission errors, for example--framing, parity andoverrun, as shown at step 207. If a transmission error is detected (theanswer to step 209 is YES), it is inferred that the received bit patternis not a valid character at the present baud rate setting (as determinedby the currently accessed baud rate entry in Table 200), and the routinetransitions to step 211, which increments the baud rate table addresscounter so as to step to the next lowest baud rate entry in the table.Starting with a default setting of 9600 for the idle state, step 211proceeds to the next lowest baud rate of 4800 baud in the presentexample.

If, on the other hand, no transmission error has been detected (theanswer to step 209 is NO), it is inferred that the received bit patterncorresponds to that of a potentially valid character at the present baudrate setting, and the routine transitions to step 213, which comparesthe stored bits of the character string with a prescribed referencecharacter (a carriage return, in the present example). If the serial bitcompositions of the two compared characters are identical (the answer tostep 215 is YES), then it is inferred that the remote site istransmitting at the current baud setting, and the microcontroller locksthe modem baud rate at that baud setting for the remainder of the call(step 217). When the call is terminated and the device logs off into anidle state, the baud rate reverts to its default setting (9600 baud inthe present example, as shown at step 201).

If the result of comparison step 215 is NO, indicating that the serialbit composition of the received character is not a complete character(including necessary stop bits) identical to the stored referencecharacter, then it is inferred that the remote site is not transmittingat the current baud setting, and the process transitions to step 211,which, as noted above, increments the baud rate table address counter tostep to the next baud rate entry in the table.

When the autobaud detection routine has stepped to a new baud rateentry, it initiates a prescribed time-out (e.g. five seconds) shown atstep 221, as a safeguard against the receiver becoming `out-of-sync`with a transmitter, whose baud rate is faster than that to which thereceiving serial device is currently set. As shown by step 223, withinthis time period the receiving serial device must receive a furthercharacter for analysis (the answer to step 223 is YES); otherwise (theanswer to step 223 is NO) it reverts to the default setting, therebyreinitiating the baud rate detection process (step 201). The period oftime prescribed in step 223 is based upon the lowest baud rateavailable, and is no less than the minimum character receive time forthe lowest baud rate entry and allowing for character separation forevery incoming character in order to ensure proper characteridentification. Customarily, the user at the remote end repeatedlyasserts the character (hits the carriage return key), to establish aconnection at any of the available baud rates. For a character receivedwithin the time out window (the answer to step 223 is YES), which isnormally the case, the routine transitions to step 207, which checks thecontents of the character for transmission errors, and the processproceeds as described above.

Eventually, the autobaud detect routine of FIG. 2 will have stepped tothe baud rate being transmitted, and captured and matched theconnectivity character at the proper baud rate. As noted above, if atransmission error occurs, it may be necessary to restep through thebaud rate table entry sequence. However, with the wrap around feature ofthe table entry addressing scheme, it is ensured that the process willnot hang up on any particular baud rate. Once the answer to step 215 isYES, indicating that the remote site is transmitting at the current baudsetting, the microcontroller locks the modem baud rate at that baudsetting for the remainder of the call (step 217).

As will be appreciated from the foregoing description, the needparticipation of technical personnel to determine and then performparameter adjustments of the control settings of a data terminals unitof a conventional baud rate setting and adjustment scheme areeffectively obviated by the autobaud detection mechanism of the presentinvention, which is readily installed as part of the communicationcontrol software of the serial communication device's microcontroller,and enables the microcontroller to automatically determine the baud rateemployed by a remote digital data communications device, so that thebaud rate of the internal modem of the unit may be readily set andlocked to that baud rate.

While I have shown and described an embodiment in accordance with thepresent invention, it is to be understood that the same is not limitedthereto but is susceptible to numerous changes and modifications asknown to a person skilled in the art, and I therefore do not wish to belimited to the details shown and described herein but intend to coverall such changes and modifications as are obvious to one of ordinaryskill in the art.

What is claimed:
 1. For use with a serial data communications devicehaving a serial port through which digital data messages are interfacedbetween a resident communications controller and a serial datacommunications link, to which a remote terminal device is coupled, amechanism for establishing the baud rate of said serial communicationsdevice at the baud rate of a digital data message received from saidremote terminal device comprising the steps of:(a) initially setting thebaud rate of said serial communications device to a default baud ratecorresponding to the highest baud rate at which said serialcommunications device is operative to communicate with a remote terminaldevice; (b) in response to an incoming call from a remote terminaldevice, examining respective bits of a received digital data stream forthe presence of transmission errors; (c) in response to step (b)detecting the presence of a transmission error, changing the baud ratefrom its current baud rate to a baud rate lower than the current baudrate, and monitoring said serial data communications link for digitaldata transmitted from said remote terminal device at said lower baudrate, but otherwise comparing the bit contents of said received digitaldata stream with a digital bit pattern associated with a prescribedreference character; and (d) in response to step (c) detecting a matchbetween said received digital data stream and said digital bit patternassociated with said prescribed reference character, setting the baudrate of said serial communications device at the current baud settingfor the remainder of the call, but otherwise changing the baud rate fromits current baud rate to said lower baud rate, and repeating steps(b)-(d), until step (d) sets the baud rate of said serial communicationsdevice for the remainder of the call.
 2. A method according to claim 1,wherein, in said baud rate changing steps (c) and (d), in response tosaid current baud rate being the lowest baud rate at which said serialcommunications device is operative to communicate with a remote terminaldevice, changing the current, lowest baud rate to said default highestbaud rate.
 3. A method according to claim 1, wherein, in each of steps(c) and (d), upon changing the baud rate from its current baud rate tosaid lower baud rate, initiating a time-out period, and repeating steps(b)-(d) only in response to the receipt of a further digital messagefrom said remote terminal within said time-out period, but otherwisechanging the baud rate from its current baud rate to said default baudrate of step (a) and repeating steps (b)-(d).
 4. A method according toclaim 3, wherein said time-out period is no less than the minimumcharacter receive time for the lowest baud rate entry, allowing forcharacter separation for every incoming character in order to ensurecharacter identification in step (c).
 5. A method according to claim 1,wherein step (a) includes the step of storing a plurality of baud raterepresentative codes associated with those baud rates at which saidserial communications device is capable of communicating with a remoteterminal device, and setting the default baud rate of said serialcommunications device to the highest baud rate at which said serialcommunications device is capable of communicating with a remote terminaldevice.
 6. A serial data communications device having a serial portthrough which digital data messages are interfaced between a residentcommunications controller and a serial data communications link, towhich a remote terminal device is coupled, said communicationscontroller having its baud rate initially set to a default baud ratecorresponding to the highest baud rate at which said serialcommunications device is capable of communicating with a remote terminaldevice, and being operative to establish the baud rate of said serialcommunications device at the baud rate of a digital data messagereceived from said remote terminal device by means of a baud rateestablishing routine which is operative to execute the followingsteps:(a) in response to an incoming call from a remote terminal device,examining respective bits of a received digital data stream for thepresence of transmission errors; (b) in response to step (a) detectingthe presence of a transmission error, changing the baud rate from itscurrent baud rate to a baud rate lower than the current baud rate, andmonitoring said serial data communications link for digital datatransmitted from said remote terminal device at said lower baud rate,but otherwise comparing the bit contents of said received digital datastream with a digital bit pattern associated with a prescribed referencecharacter; and (c) in response to step (b) detecting a match betweensaid received digital data stream and said digital bit patternassociated with said prescribed reference character, setting the baudrate of said serial communications device at the current baud settingfor the remainder of the call, but otherwise changing the baud rate fromits current baud rate to said lower baud rate, and repeating steps(a)-(c), until step (c) sets the baud rate of said serial communicationsdevice for the remainder of the call.
 7. A serial data communicationsdevice according to claim 6, wherein, in said baud rate changing steps(b) and (c), in response to said current baud rate being the lowest baudrate at which said serial communications device is operative tocommunicate with a remote terminal device, said routine is operative tochange the current, lowest baud rate to said default highest baud rate.8. A serial data communications device according to claim 6, wherein, ineach of steps (b) and (c), upon changing the baud rate from its currentbaud rate to said lower baud rate, said routine is operative to initiatea time-out period, and repeat steps (a)-(c) only in response to thereceipt of a further digital message from said remote terminal withinsaid time-out period, but otherwise said routine changes the baud ratefrom its current baud rate to said default baud rate and repeats steps(a)-(c).
 9. A serial data communications device according to claim 8,wherein said time-out period is no less than the minimum characterreceive time for the lowest baud rate entry, allowing for characterseparation for every incoming character in order to ensure characteridentification in step (b).
 10. A serial data communications deviceaccording to claim 6, wherein said communications controller includesmemory which stores a plurality of baud rate representative codesassociated with those baud rates at which said serial communicationsdevice is capable of communicating with a remote terminal device.
 11. Amethod according to claim 1, wherein said transmission errors includeerrors in framing, parity and overrun.
 12. A serial data communicationsdevice according to claim 6, wherein said transmission errors includeerrors in framing, parity and overrun.